pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let x = num_str.split('(').collect::<Vec<_>>();
    let mut base = x[1].chars();
    base.next_back();
    let base = base
        .collect::<String>()
        .parse::<u64>()
        .expect("base parse failed");
    let mut st = 1u64;
    let mut res = 0;
    for i in x[0].bytes().rev() {
        res += (i - b'0') as u64 * st;
        st *= base;
    }
    let mut ans = vec![];
    let to_base = to_base as u64;
    while res > 0 {
        let now_ch = res % to_base;
        ans.push(match now_ch {
            0..=9 => now_ch as u8 + b'0',
            _ => now_ch as u8 + b'a' - 10,
        } as char);
        res /= to_base;
    }
    ans.reverse();
    ans.iter().collect()
}
